<?php
	$title='Edit Personal Data';
	$description='Edit Personal Data';
	$keywords='user, data, edit';
?>
<?php include('../fns_all.php'); ?>
<?php include('../views/layouts/_header.php'); ?>
<?php include('../views/layouts/_left.php'); ?>

Edit Your Personal Data:<br/>

<?php
//check if logged in

if(isset($_SESSION['user'])){
	$user = $_SESSION['user'];

	print <<<HERE

	<form name="form1" method="post" action="manage_users.php?action=edit" enctype="multipart/form-data">

		  <table width="250" border="0" class="main-content-text" >
			  <tr>
				<td>User Name:</td>
				<td><input value="$user->user_name" type="text" name="user_name" id="user_name"></td>
			  </tr>
			  <tr>
				<td>Email Address:</td>
				<td><input value="$user->email" type="text" name="email" id="email"></td>
			  </tr>
			  <tr>
				<td>First Name:</td>
				<td><input value="$user->first_name" type="text" name="fname" id="fname"></td>
			  </tr>
			  <tr>
				<td>Last Name:</td>
				<td><input value="$user->last_name" type="text" name="lname" id="lname"></td>
			  </tr>
			  <tr>
				<td>City:</td>
				<td><input value="$user->city" type="text" name="city" id="city"></td>
			  </tr>
			  <tr>
				<td>Country:</td>
				<td><input value="$user->country" type="text" name="country" id="country"></td>
			  </tr>
			  <tr>
	            <td>
	            	<img src="../images/users/thumbnails/$user->img_path" style="float:left;" hspace="10" vspace="10" border="0" align="texttop" onclick="window.open('/images/articles/$user->img_path');"/>
	            </td>
	            <td>Change your image: <br/><input name="img_file" type="file"  />
	            <br/>(images must be less than 2MB and in jpg format)</td>
	          </tr>
		  </table>

		 <p>
		   <label>
		   <input type="submit" name="submit" id="submit" value="Save Changes">
		   </label>
		 </p>
	</form>

HERE;
}



?>

<?php include('../views/layouts/_footer.php'); ?>